
<div class="tab-pane fade" id="tab-finance" >
	<table class="table user-list" id="financeList">
		<thead>
			<tr>
				<th data-column-id="id"><span>ID</span></th>
				<th data-column-id="name" data-sortable="false"><span>项目名称</span></th>
				<th data-column-id="investment_scale" data-sortable="false"><span>投资规模</span></th>
				<th data-column-id="start_time" data-sortable="false"><span>开始时间</span></th>
				<th data-column-id="end_time" data-sortable="false"><span>结束时间</span></th>
				<th data-column-id="verify_state" data-sortable="false"><span>状态</span></th>
				<th data-sortable="false" data-formatter="commands"><span>操作</span></th>
			</tr>
		</thead>
		<tbody>
		</tbody>
	</table>
</div>


<script type="text/javascript">

var labelsSetting = {
	infos: "当前第 {{ctx.start}} 条 到 {{ctx.end}} 条 共 {{ctx.total}} 条数据",
	search: "搜索",
	loading: "正在加载...",
	noResults: "未找到您要的数据...",
	refresh: "刷新",
	all: "全部"
};


$("#showFinance").click(function(){
	$("#financeList").bootgrid({
		rowCount: [10, 25, 50],
	    ajax:true,
	    url: "get_project_finance?uid="+uid+"",
	    labels:labelsSetting,
	    formatters: {
	    	"commands": function(k,row){
	    		return '<a href="javascript:void(0);" fin_id="'+row.fin_id+'" class="table-link doEdit"><span class="fa-stack"><i class="fa fa-square fa-stack-2x"></i><i class="fa fa-pencil fa-stack-1x fa-inverse"></i></span></a>' + '<a href="javascript:void(0);" fin_id="'+row.fin_id+'" class="table-link doDetail"><span class="fa-stack"><i class="fa fa-square fa-stack-2x"></i><i class="fa fa-search-plus fa-stack-1x fa-inverse"></i></span></a>';
	    	}
	    }
	}).on("loaded.rs.jquery.bootgrid", function (e)
	{
		$(".doEdit").bind("click", function(){
			var fin_id = $(this).attr("fin_id");
			window.location.href="<%url('admin/finance/edit_finance?fin_id=')%>"+fin_id;
		})

		$(".doDetail").bind("click", function(){
			var fin_id = $(this).attr("fin_id");
			window.location.href="<%url('admin/finance/detail_finance?fin_id=')%>"+fin_id;
		})
	});

	$(".input-group").hide();
	$(".btn-group").hide();
})


</script>

